﻿namespace Way.Bus.WMS.ST.Model
{
    using Acc.Contract.MVC;
    using System;
    using System.Runtime.CompilerServices;
    using Way.Bus.DGWMS.Model;
    using Way.Bus.Model;
    using Way.EAP.DataAccess.Entity;

    public class ST_Transportplan : Transportplan
    {
        private HierarchicalEntityView<ST_Transportplan, ST_Transportplan> _childItems;
        private HierarchicalEntityView<ST_Transportplan, ST_TransportplanOutNotice> _notice;

        [HierarchicalEntityControl(visible=false)]
        public HierarchicalEntityView<ST_Transportplan, ST_Transportplan> ChildItems
        {
            get
            {
                if (this._childItems == null)
                {
                    this._childItems = new HierarchicalEntityView<ST_Transportplan, ST_Transportplan>(this);
                }
                return this._childItems;
            }
        }

        [HierarchicalEntityControl(isadd=false, isedit=false, isselect=true, c="Way.Bus.WMS.ST.Controllers.OutOrder.ST_OutNoticeController", ischeck=true)]
        public HierarchicalEntityView<ST_Transportplan, ST_TransportplanOutNotice> Notice
        {
            get
            {
                if (this._notice == null)
                {
                    this._notice = new HierarchicalEntityView<ST_Transportplan, ST_TransportplanOutNotice>(this);
                }
                return this._notice;
            }
        }

        [EntityControl("司机电话", false, true, 4), EntityField(12)]
        public int PhoneCode { get; set; }

        [EntityForeignKey(typeof(OfficeWorker), "ID", "WorkName"), EntityField(0xff), EntityControl("司机", false, true, 3)]
        public string WORKERID { get; set; }
    }
}

